using System.Collections.Generic;

namespace Verse;

public class PawnCapacityWorker
{
	public virtual float CalculateCapacityLevel(HediffSet diffSet, List<PawnCapacityUtility.CapacityImpactor> impactors = null)
	{
		return 1f;
	}

	public virtual bool CanHaveCapacity(BodyDef body)
	{
		return true;
	}

	protected float CalculateCapacityAndRecord(HediffSet diffSet, PawnCapacityDef capacity, List<PawnCapacityUtility.CapacityImpactor> impactors)
	{
		float level = diffSet.pawn.health.capacities.GetLevel(capacity);
		if (impactors != null && level != 1f)
		{
			impactors.Add(new PawnCapacityUtility.CapacityImpactorCapacity
			{
				capacity = capacity
			});
		}
		return level;
	}
}
